<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>爬虫管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../../lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../css/public.css" media="all">
</head>
<body>
<!--<div style="padding: 20px; background-color: #F2F2F2;">
<div class="layui-row layui-col-space15">

    <div class="layui-col-md6">
        <div class="layui-card">
            <div class="layui-card-header">卡片面板</div>
            <div class="layui-card-body">
                <table class="layui-table" lay-skin="line" style="border: 0;">
                    <colgroup>
                        <col width="150">
                        <col width="150">
                        <col width="200">
                        <col>
                    </colgroup>

                    <tbody>
                    <tr>
                        <th style="color: #909399">人物</th>
                        <th style="color: #909399">民族</th>

                    </tr>
                    <tr>
                        <td>贤心</td>
                        <td>汉族</td>

                    </tr>
                    <tr>
                        <td>张爱玲</td>
                        <td>汉族</td>

                    </tr>
                    <tr>
                        <td>Helen Keller</td>
                        <td>拉丁美裔</td>

                    </tr>
                    <tr>
                        <td>岳飞</td>
                        <td>汉族</td>

                    </tr>
                    <tr>
                        <td>孟子</td>
                        <td>华夏族（汉族）</td>

                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>-->
<div style="padding: 20px; background-color: #F2F2F2;">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header" style="font-size: 16px;color: #303133">CPU</div>
                <div class="layui-card-body">
                    <table class="layui-table" lay-skin="line" style="border: 0;">
                        <colgroup>
                            <col width="150">
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <tbody>
                        <tr>
                            <th style="color: #909399">属性</th>
                            <th style="color: #909399">值</th>
                        </tr>
                        <tr>
                            <td>核心数</td>
                            <td id="cpu_cpuNum"></td>
                        </tr>
                        <tr>
                            <td>用户使用率</td>
                            <td id="cpu_used"></td>
                        </tr>
                        <tr>
                            <td>系统使用率</td>
                            <td id="cpu_sys"></td>
                        </tr>
                        <tr>
                            <td>当前空闲率</td>
                            <td id="cpu_free"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header" style="font-size: 16px;color: #303133">内存</div>
                <div class="layui-card-body">
                    <table class="layui-table" lay-skin="line" style="border: 0;">
                        <colgroup>
                            <col width="150">
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <tbody>
                        <tr>
                            <th style="color: #909399">属性</th>
                            <th style="color: #909399">内存</th>
                            <th style="color: #909399">JVM</th>
                        </tr>
                        <tr>
                            <td>总内存</td>
                            <td id="mem_total"></td>
                            <td id="jvm_total"></td>
                        </tr>
                        <tr>
                            <td>已用内存</td>
                            <td id="mem_used"></td>
                            <td id="jvm_used"></td>
                        </tr>
                        <tr>
                            <td>剩余内存</td>
                            <td id="mem_free"></td>
                            <td id="jvm_free"></td>
                        </tr>
                        <tr>
                            <td>使用率</td>
                            <td id="mem_usage"></td>
                            <td id="jvm_usage"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header" style="font-size: 16px;color: #303133">服务器信息</div>
                <div class="layui-card-body">
                    <table class="layui-table" lay-skin="line" style="border: 0;">
                        <colgroup>
                            <col width="150">
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <tbody>
                        <tr>
                            <td style="width: 25%">服务器名称</td>
                            <td style="width: 25%" id="sys_computerName"></td>
                            <td style="width: 25%">操作系统</td>
                            <td style="width: 25%" id="sys_osName"></td>
                        </tr>
                        <tr>
                            <td>服务器IP</td>
                            <td id="sys_computerIp"></td>
                            <td>系统架构</td>
                            <td id="sys_osArch"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header" style="font-size: 16px;color: #303133">Java虚拟机信息</div>
                <div class="layui-card-body">
                    <table class="layui-table" lay-skin="line" style="border: 0;">
                        <colgroup>
                            <col width="150">
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <tbody>
                        <tr>
                            <td style="width: 25%">Java名称</td>
                            <td style="width: 25%" id="jvm_name"></td>
                            <td style="width: 25%">Java版本</td>
                            <td style="width: 25%" id="jvm_version"></td>
                        </tr>
                        <tr>
                            <td>启动时间</td>
                            <td id="jvm_startTime"></td>
                            <td>运行时长</td>
                            <td id="jvm_runTime"></td>
                        </tr>
                        <tr>
                            <td>安装路径</td>
                            <td id="jvm_home"></td>
                            <td>项目路径</td>
                            <td id="sys_userDir"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header" style="font-size: 16px;color: #303133">磁盘状态</div>
                <div class="layui-card-body">
                    <table class="layui-table" lay-skin="line" style="border: 0;">
                        <colgroup>
                            <col width="150">
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <tbody>
                        <tr>
                            <td style="width: 12.5%">盘符路径</td>
                            <td style="width: 12.5%">系统文件</td>
                            <td style="width: 12.5%">盘符类型</td>
                            <td style="width: 12.5%">总大小</td>
                            <td style="width: 12.5%">可用大小</td>
                            <td style="width: 12.5%">已用大小</td>
                            <td >已用百分比</td>
                        </tr>
                        <tr>
                            <td style="width: 12.5%" id="sysFiles_dirName"></td>
                            <td style="width: 12.5%" id="sysFiles_sysTypeName"></td>
                            <td style="width: 12.5%" id="sysFiles_typeName"></td>
                            <td style="width: 12.5%" id="sysFiles_total"></td>
                            <td style="width: 12.5%" id="sysFiles_free"></td>
                            <td style="width: 12.5%" id="sysFiles_used"></td>
                            <td  id="sysFiles_usage"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="../../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script src="../../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="../../../lib/jq-module/jquery.particleground.min.js" charset="utf-8"></script>
<script src="../../../lib/common/jquery.cookie.min.js" charset="utf-8"></script>
<script src="../../../lib/common/common.js" charset="utf-8"></script>
<script type="text/javascript">
    $.get(api+"server/getServer",function (rs) {
        $("#cpu_cpuNum").html(rs.data.cpu.cpuNum);
        $("#cpu_used").html(rs.data.cpu.used+"%");
        $("#cpu_sys").html(rs.data.cpu.sys+"%");
        $("#cpu_free").html(rs.data.cpu.free+"%");

        $("#mem_total").html(rs.data.mem.total+"G");
        $("#mem_used").html(rs.data.mem.used+"G");
        $("#mem_free").html(rs.data.mem.free+"G");
        $("#mem_usage").html(rs.data.mem.usage+"%");

        $("#jvm_total").html(rs.data.jvm.total+"M");
        $("#jvm_used").html(rs.data.jvm.used+"M");
        $("#jvm_free").html(rs.data.jvm.free+"M");
        $("#jvm_usage").html(rs.data.jvm.usage+"%");

        $("#sys_computerName").html(rs.data.sys.computerName);
        $("#sys_osName").html(rs.data.sys.osName);
        $("#sys_computerIp").html(rs.data.sys.computerIp);
        $("#sys_osArch").html(rs.data.sys.osArch);

        $("#jvm_name").html(rs.data.jvm.name);
        $("#jvm_version").html(rs.data.jvm.version);
        $("#jvm_startTime").html(rs.data.jvm.startTime);
        $("#jvm_runTime").html(rs.data.jvm.runTime);
        $("#jvm_home").html(rs.data.jvm.home);
        $("#sys_userDir").html(rs.data.sys.userDir);

        $("#sysFiles_dirName").html(rs.data.sysFiles[0].dirName);
        $("#sysFiles_sysTypeName").html(rs.data.sysFiles[0].sysTypeName);
        $("#sysFiles_typeName").html(rs.data.sysFiles[0].typeName);
        $("#sysFiles_total").html(rs.data.sysFiles[0].total);
        $("#sysFiles_used").html(rs.data.sysFiles[0].used);
        $("#sysFiles_free").html(rs.data.sysFiles[0].free);
        $("#sysFiles_usage").html(rs.data.sysFiles[0].usage);
    })
</script>
</body>
</html>